<template>
  <div>

    <h-input v-model="post" rule="postcode" ref="post"></h-input>
    <h-input v-model="phone" rule="phone" ref="phone"></h-input>

    {{ post }}
    {{ phone }}

    <h-button @click="format">format</h-button>
    <h-button @click="verify">verify</h-button>


  </div>
</template>

<script>
export default {
  data() {
    return {
      post: '',
      phone: '',
    }
  },
  methods: {
    format() {
      console.log(this.$refs.post.format(this.post))
      console.log(this.$refs.phone.format(this.phone))
    },
    verify() {
      console.log(this.$refs.post.verify(this.post))
      console.log(this.$refs.phone.verify(this.phone))
    }
  }
}
</script>

<style>

</style>